package com.canomo.constants;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

/**
 * 文件相关常量
 */
public class FileConstants {

    /**
     * 文件的根路径
     */
    public final static String FILE_ROOT_PATH = "file_root_path";

    /**
     * 根据不同的文件后缀，保存到相应的目录下
     */

    public final static Map<String,String>  CONVERT_PATH = Collections.unmodifiableMap(new HashMap<String,String>() {
        {
            //图片
            put("jpg","image");
            put("jpeg","image");
            put("png","image");
            put("gif","image");
            put("bmp","image");
            //文档
            put("doc","document");
            put("docx","document");
            put("xls","document");
            put("xlsx","document");
            put("ppt","document");
            //文本
            put("txt","text");
            put("sql","text");
            put("html","text");
            //压缩包
            put("zip","compress");
            put("rar","compress");
            put("other","other");

        }
    });

    public static final String CONVERT_PATH_OTHER = CONVERT_PATH.get("other");

    public static final String DEMO = "DEMO";
}
